<div class="pull-left">
  <h4>Condition</h4>
</div>
<div class="pull-right">
  <%= link_to 'Add new condition', new_truck_truck_condition_path(@truck), :class => 'btn btn-mini btn-primary' %>
</div>
<table class="table table-bordered">
  <thead>
    <tr>
      <th>ID</th>
      <th>Condition</th>
      <th>From date</th>
      <th>Through date</th>
      <th>Remarks</th>
      <th>Action</th>
    </tr>
  </thead>
  <tbody>
    <% @truck.truck_conditions.each do |truck_condition| %>
    <tr>
      <td> <%= truck_condition.id%> </td>
      <td> <%= truck_condition.truck_condition_type.name %> </td>
      <td> <%= truck_condition.from_date %> </td>
      <td> <%= truck_condition.through_date %> </td>
      <td> <%= truck_condition.remarks %> </td>
      <td> <%= link_to 'Edit', edit_truck_truck_condition_path(@truck, truck_condition), :class => 'btn btn-mini btn-primary' %>
      <%= link_to 'Remove', truck_truck_condition_path(@truck, truck_condition), :confirm => 'Are you sure?', :method => :delete, :class => 'btn btn-mini btn-danger' %> </td>
    </tr>
    <% end %>
  </tbody>
</table>
